package com.example.springtest.people.pojo.dto;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@ApiModel(value = "新增人员",description = "对新增人员信息封装")
public class PeopleDTO {
    //id自增不需校验
    private Integer id;

    @NotEmpty(message = "姓名不能为空")
    @ApiModelProperty(value = "学生姓名", name = "name", example = "Selena", required = true)
    private String name;
    @NotEmpty(message = "性别不能为空")
    @ApiModelProperty(value = "学生性别", name = "sex", example = "男", required = true)
    private String sex;
    @NotNull(message = "年龄不能为空")
    @ApiModelProperty(value = "学生年龄", name = "age", example = "18", required = true)
    private Integer age;
    @NotEmpty(message = "专业不能为空")
    @ApiModelProperty(value = "学生专业", name = "major", example = "计算机", required = true)
    private String major;
    @NotEmpty(message = "学号不能为空")
    @ApiModelProperty(value = "学生学号", name = "code", example = "124536", required = true)
    private String code;
    private String address;
    //健康状况
    private String status;

}
